# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
from cerbero.tools.libtool import LibtoolLibrary

class Recipe(recipe.Recipe):
    name = 'proxy-libintl'
    version = '0.1'
    licenses = [License.LGPLv2Plus]
    stype = SourceType.TARBALL
    btype = BuildType.MESON
    url = 'https://github.com/frida/proxy-libintl/archive/%(version)s.tar.gz'
    tarball_checksum = '202d90855943091b11ac91863ff5884f0eaf80318a32dc8504fcfdafc65992ed'
    patches = [name + '/0001-libintl.h-Fix-detection-with-AM_GNU_GETTEXT.patch',
               name + '/0001-meson-Use-same-library-versioning-on-macOS-as-gettex.patch',]

    files_libs = ['libintl']
    files_devel = [
            'include/libintl.h',
            'lib/libintl.la'
            ]

    def post_install(self):
        libtool_la = LibtoolLibrary('intl', 8, None, None, self.config.libdir,
                self.config.target_platform)
        libtool_la.save()
        super().post_install()
